<?php

// Global user functions
// Page Loading event
function Page_Loading() {     

       global $lt,$portalId; 
  $_REQUEST["portalId"]=getPortalId(); 
  $portalId=$_REQUEST["portalId"];
  $_REQUEST["agencyId"]=getAgencyId();  

   $sSql = "Select * From portal_logins Where login = '".@$_SESSION[EW_SESSION_USER_PROFILE_USER_NAME]."' and portalId=".$_REQUEST["portalId"];  
    $rs=$GLOBALS["conn"]->Execute($sSql);                                                                            
    $_REQUEST["logo"]="omnitechnologies.jpg"; 
    $_REQUEST["UserId"]=$rs->fields["id"]; 
         
              
    $sSql="Select portal.sitelogo_".$lt."_file as logo From portal Where portal.id =".$_REQUEST["portalId"];
     $rs=$GLOBALS["conn"]->Execute($sSql);              
    $_REQUEST["logo"]=$rs->fields["logo"]; 
            getPortalLanguagesFilter();     
                                                        
   //if (isset($_REQUEST["P"])) $_SESSION["P"]=$_REQUEST["P"];    
   
      
    if (getParameter("operation")=="nextstage")
        {                                  
        nextWorkflowStage(getParameter("objectId"),getParameter("workflowId"),getParameter("workflow_stageId"),getParameter("object"));
        }   
        
         if (getParameter("operation")=="restartworkflow")
        {                         
        restartWorkflow(getParameter("objectId"),getParameter("workflowId"),getParameter("object"));
        }   
        
        if (getParameter("operation")=="reapplyworkflow")
        {                         
        reApplyWorkflow(getParameter("objectId"),getParameter("authoringId"),getParameter("object"));
        }     
       
           
}                                                                          

// Page Unloaded event
function Page_Unloaded() {

	//echo "Page Unloaded";
}
include "../userfn.php";      
//include "../vars.php";








?>
